//
//  RWNewViewController.m
//  baisibudejie
//
//  Created by renwei on 16/9/13.
//  Copyright © 2016年 renwei. All rights reserved.
//

#import "RWNewViewController.h"

#import "RWSubTagTableViewController.h"

@interface RWNewViewController()

@end

@implementation RWNewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor yellowColor];
    
    // 设置导航条
    [self setupNavBar];
}

#pragma mark - 设置导航条
- (void)setupNavBar {
    
    // 左边按钮
    // 把UIButton包装成UIBarButtonItem.就导致按钮点击区域扩大
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithimage:[UIImage imageNamed:@"MainTagSubIcon"] highImage:[UIImage imageNamed:@"MainTagSubIconClick"] target:self action:@selector(tagClick)];
    
    // titleView
    self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"MainTitle"]];
    
}

#pragma mark - 点击订阅标签调用
- (void)tagClick {
    
    RWSubTagTableViewController *subTagTableVC = [[RWSubTagTableViewController alloc] init];
    [self.navigationController pushViewController:subTagTableVC animated:YES];
}

@end
